package com.graduation.smartparkingplatform.Dao;

import com.graduation.smartparkingplatform.Pojo.Charge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface ChargeMapper {

  public List<Charge> getChargeList();

  public List<Charge> searchCharge(
      @Param("chargeType") String chargeType, @Param("chargeName") String chargeName);

  public Boolean addCharge(
      @Param("chargeType") Boolean changeType,
      @Param("chargeName") String changeName,
      @Param("chargeFreeTime") Integer chargeFreeTime,
      @Param("chargeMin") BigDecimal chargeMin,
      @Param("chargeMax") BigDecimal chargeMax,
      @Param("chargeUnitt") BigDecimal chargeUnitt,
      @Param("chargeChargingMin") BigDecimal chargeChargingMin,
      @Param("chargeChargingUnitt") BigDecimal chargeChargingUnitt,
      @Param("remarks") String remarks);

  public Boolean chargeInfo(
      @Param("chargeId") Integer chargeId,
      @Param("chargeType") Boolean chargeType,
      @Param("chargeName") String chargeName,
      @Param("chargeFreeTime") Integer chargeFreeTime,
      @Param("chargeMin") BigDecimal chargeMin,
      @Param("chargeMax") BigDecimal chargeMax,
      @Param("chargeUnitt") BigDecimal chargeUnitt,
      @Param("chargeChargingMin") BigDecimal chargeChargingMin,
      @Param("chargeChargingUnitt") BigDecimal chargeChargingUnitt,
      @Param("remarks") String remarks);

  public Boolean deleteCharge(@Param("chargeId") Integer chargeId);
}
